package com.hframe.typefilter;

/**
 * 字符串转数字
 *
 * @author Administrator
 */
public class StringToInteger implements FilterRef<Integer, Object> {

    @Override
    public Integer filter(Object object) throws Exception {
        return parse((String) object);
    }

    public static Integer parse(String object) {
        try {
            return Integer.parseInt(object);
        } catch (Exception e) {
            return null;
        }

    }

}